package com.ja.openchat.viewmodels;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.ja.openchat.R;


public class ExpressionStoreDetailViewModel extends PagedViewModel<ExpressionStoreDetailItemViewModel, String> {
    private int type;
    public ObservableField<String> typeDes = new ObservableField<>("");
    public ObservableField<Integer> typeStatus = new ObservableField<>(1);

    public void setType(int type) {
        this.type = type;
        if (type == 1) {
            this.typeDes.set("添加");
        } else {
            this.typeDes.set("移除");
        }
        typeStatus.set(type);
        for (int i = 0; i < 12; i++) {
            ExpressionStoreDetailItemViewModel expressionStoreDetailItemViewModel = new ExpressionStoreDetailItemViewModel(this);
            expressionStoreDetailItemViewModel.multiItemType(MULTIRECYCLETYPE_CONTENT);
            observableList.add(expressionStoreDetailItemViewModel);
        }
    }

    public ExpressionStoreDetailViewModel(@NonNull Application application) {
        super(application);
    }

    @Override
    public void requestData(int page) {
    }

    @Override
    public int initContentView() {
        return R.layout.item_expression_store_detail;
    }

}
